using System;
using System.ComponentModel.DataAnnotations;

namespace ERP.ProductionManage.Dtos
{
    /// <summary>
    /// 创建客户订单 DTO
    /// </summary>
    public class CreateCustomerOrderDto
    {
        /// <summary>
        /// 产品编码
        /// </summary>
        [Required(ErrorMessage = "产品编码不能为空")]
        public string ProductCode { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        [Required(ErrorMessage = "产品名称不能为空")]
        public string ProductName { get; set; }

        /// <summary>
        /// 产品规格
        /// </summary>
        public string ProductSpec { get; set; }

        /// <summary>
        /// 订单编码
        /// </summary>
        [Required(ErrorMessage = "订单编码不能为空")]
        public string OrderCode { get; set; }

        /// <summary>
        /// 客户编码
        /// </summary>
        [Required(ErrorMessage = "客户编码不能为空")]
        public string CustomerCode { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary>
        [Required(ErrorMessage = "客户名称不能为空")]
        public string CustomerName { get; set; }

        /// <summary>
        /// 订货日期
        /// </summary>
        [Required(ErrorMessage = "订货日期不能为空")]
        public DateTime OrderDate { get; set; }

        /// <summary>
        /// 交货日期
        /// </summary>
        [Required(ErrorMessage = "交货日期不能为空")]
        public DateTime DeliveryDate { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        public string Specification { get; set; }

        /// <summary>
        /// 订货数量
        /// </summary>
        [Required(ErrorMessage = "订货数量不能为空")]
        [Range(1, int.MaxValue, ErrorMessage = "订货数量必须大于0")]
        public int Quantity { get; set; }

        /// <summary>
        /// 计量单位
        /// </summary>
        [Required(ErrorMessage = "计量单位不能为空")]
        public string Unit { get; set; }

        /// <summary>
        /// 质量要求说明
        /// </summary>
        public string QualityRequirements { get; set; }
    }
} 